
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for xtglBaseinfo.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="xtglBaseinfoForm"
 */
public class XtglBaseinfoForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _infoId = null;
   private java.lang.String _infoName = null;
   private java.lang.String _infoCode = null;
   private java.lang.String _infoAdminName = null;
   private java.lang.String _infoAdminPassword = null;
   private java.lang.String _infoVersion = null;
   private java.lang.String _infoPublishData = null;
   private java.lang.String _infoOwner = null;
   private java.lang.String _infoOwnerShortname = null;
   private java.lang.String _infoDeveloper = null;
   private java.lang.String _infoLoginLogo = null;
   private java.lang.String _infoIndexLogo = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;
   private java.lang.String _zt3 = null;

   /**
    * Standard constructor.
    */
   public XtglBaseinfoForm() {
   }

   /**
    * Returns the infoId
    *
    * @return the infoId
    */
   public java.lang.String getInfoId() {
      return _infoId;
   }

   /**
    * Sets the infoId
    *
    * @param infoId the new infoId value
    */
   public void setInfoId(java.lang.String infoId) {
      _infoId = infoId;
   }
   /**
    * Returns the infoName
    *
    * @return the infoName
    */
   public java.lang.String getInfoName() {
      return _infoName;
   }

   /**
    * Sets the infoName
    *
    * @param infoName the new infoName value
    */
   public void setInfoName(java.lang.String infoName) {
      _infoName = infoName;
   }
   /**
    * Returns the infoCode
    *
    * @return the infoCode
    */
   public java.lang.String getInfoCode() {
      return _infoCode;
   }

   /**
    * Sets the infoCode
    *
    * @param infoCode the new infoCode value
    */
   public void setInfoCode(java.lang.String infoCode) {
      _infoCode = infoCode;
   }
   /**
    * Returns the infoAdminName
    *
    * @return the infoAdminName
    */
   public java.lang.String getInfoAdminName() {
      return _infoAdminName;
   }

   /**
    * Sets the infoAdminName
    *
    * @param infoAdminName the new infoAdminName value
    */
   public void setInfoAdminName(java.lang.String infoAdminName) {
      _infoAdminName = infoAdminName;
   }
   /**
    * Returns the infoAdminPassword
    *
    * @return the infoAdminPassword
    */
   public java.lang.String getInfoAdminPassword() {
      return _infoAdminPassword;
   }

   /**
    * Sets the infoAdminPassword
    *
    * @param infoAdminPassword the new infoAdminPassword value
    */
   public void setInfoAdminPassword(java.lang.String infoAdminPassword) {
      _infoAdminPassword = infoAdminPassword;
   }
   /**
    * Returns the infoVersion
    *
    * @return the infoVersion
    */
   public java.lang.String getInfoVersion() {
      return _infoVersion;
   }

   /**
    * Sets the infoVersion
    *
    * @param infoVersion the new infoVersion value
    */
   public void setInfoVersion(java.lang.String infoVersion) {
      _infoVersion = infoVersion;
   }
   /**
    * Returns the infoPublishData
    *
    * @return the infoPublishData
    */
   public java.lang.String getInfoPublishData() {
      return _infoPublishData;
   }

   /**
    * Sets the infoPublishData
    *
    * @param infoPublishData the new infoPublishData value
    */
   public void setInfoPublishData(java.lang.String infoPublishData) {
      _infoPublishData = infoPublishData;
   }
   /**
    * Returns the infoOwner
    *
    * @return the infoOwner
    */
   public java.lang.String getInfoOwner() {
      return _infoOwner;
   }

   /**
    * Sets the infoOwner
    *
    * @param infoOwner the new infoOwner value
    */
   public void setInfoOwner(java.lang.String infoOwner) {
      _infoOwner = infoOwner;
   }
   /**
    * Returns the infoOwnerShortname
    *
    * @return the infoOwnerShortname
    */
   public java.lang.String getInfoOwnerShortname() {
      return _infoOwnerShortname;
   }

   /**
    * Sets the infoOwnerShortname
    *
    * @param infoOwnerShortname the new infoOwnerShortname value
    */
   public void setInfoOwnerShortname(java.lang.String infoOwnerShortname) {
      _infoOwnerShortname = infoOwnerShortname;
   }
   /**
    * Returns the infoDeveloper
    *
    * @return the infoDeveloper
    */
   public java.lang.String getInfoDeveloper() {
      return _infoDeveloper;
   }

   /**
    * Sets the infoDeveloper
    *
    * @param infoDeveloper the new infoDeveloper value
    */
   public void setInfoDeveloper(java.lang.String infoDeveloper) {
      _infoDeveloper = infoDeveloper;
   }
   /**
    * Returns the infoLoginLogo
    *
    * @return the infoLoginLogo
    */
   public java.lang.String getInfoLoginLogo() {
      return _infoLoginLogo;
   }

   /**
    * Sets the infoLoginLogo
    *
    * @param infoLoginLogo the new infoLoginLogo value
    */
   public void setInfoLoginLogo(java.lang.String infoLoginLogo) {
      _infoLoginLogo = infoLoginLogo;
   }
   /**
    * Returns the infoIndexLogo
    *
    * @return the infoIndexLogo
    */
   public java.lang.String getInfoIndexLogo() {
      return _infoIndexLogo;
   }

   /**
    * Sets the infoIndexLogo
    *
    * @param infoIndexLogo the new infoIndexLogo value
    */
   public void setInfoIndexLogo(java.lang.String infoIndexLogo) {
      _infoIndexLogo = infoIndexLogo;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }
   /**
    * Returns the zt3
    *
    * @return the zt3
    */
   public java.lang.String getZt3() {
      return _zt3;
   }

   /**
    * Sets the zt3
    *
    * @param zt3 the new zt3 value
    */
   public void setZt3(java.lang.String zt3) {
      _zt3 = zt3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getInfoId() == null) {
         errors.add("infoId", new ActionError("error.infoId.required"));
      }
      // TODO test format/data
      return errors;
   }
}
